<template>
  <div>
    <h3>搜索栏</h3>
    <h4>路由参数 -- {{routeParam}}</h4>
    <h4>直接获取路由参数：{{this.$route.query.name}} === {{ this.$route.query.age}}</h4>
  </div>
</template>
<script>
export default {
  name: "Search",
  data() {
    return {
      routeParam: "",
    }
  },
  created() {
    let name = this.$route.query.name;
    let age = this.$route.query.age;
    let param = {name: name, age: age};
    this.routeParam = JSON.stringify(param);

  }
}
</script>
<style scoped>

</style>
